package vn.mahjonggame.util;

import java.util.Comparator;

import vn.mahjonggame.metadata.Player;

public class PlayerComparator implements Comparator<Player> {

	@Override
	public int compare(Player player0, Player player1) {
		
		if(player0.getPlayerPosition() < player1.getPlayerPosition()){
			return -1;
		}
		else if (player0.getPlayerPosition() > player1.getPlayerPosition()){
			return 1;
		}
		else {
			return 0;
		}		
	}

}
